<template>
	<view class="container">
		<view class="content-list">
			<view class="list">
				<view class="image">
					<u--image mode="scaleToFill" :src="contentData.cover_img" width="100vw" height="600rpx"></u--image>
				</view>
				<view class="title">{{ contentData.title }}</view>
				<view class="content">{{ contentData.content }}</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { articleTextQuery } from '@/api/getList.js';
	export default {
		data() {
			return {
				Id: "",
				contentData: {}
			}
		},
		created() {
			const item = uni.getStorageSync("item");
			const data = item;
			this.contentData = data;
			this.$set(this,'Id',data.Id);
			this.articleTextQueryData();
		},
		methods: {
			async articleTextQueryData(){
				const { data } = await articleTextQuery({ Id: this.Id });
				console.log(data,'data');
				this.contentData = data;
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;
		box-sizing: border-box;
		min-height: calc(100vh);
		overflow-y: scroll;
		background-color: #FFFFFF;
	}
	.content-list {
		display: flex;
		flex-wrap: wrap;
		width: 100%;
		justify-content: space-between;
		box-sizing: border-box;
		padding: 0 20rpx 10rpx 20rpx;
		.list {
			width: 100%;
			margin: 0 0 10rpx 0;
			background-color: #FFFFFF;
			border-radius: 8rpx;
			.image {
				width: 100%;
				display: flex;
				justify-content: center;
				image {
					width: 100% !important;
				}
			}
			.title {
				padding: 20rpx 0;
				font-size: 40rpx;
				font-weight: 900;
				text-align: center;
			}
			.content {
				box-sizing: border-box;
				padding: 0 20rpx;
				font-size: 30rpx;
				line-height: 50rpx;
				color: #666;
			}
		}
	}
</style>
